package com.rxyb.authority.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.rxyb.authority.db.po.OpsAuthorityMenu;
import com.rxyb.authority.gateway.dto.menu.*;
import com.rxyb.core.respone.R;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author DUYH
 * @since 2020-05-29
 */
public interface OpsAuthorityMenuService extends IService<OpsAuthorityMenu> {

    /**
     * 创建
     *
     * @author duyh
     */
    R<CreateMenuRsp> create(CreateMenuReq createMenuReq);

    /**
     * 详情
     *
     * @author duyh
     */
    R<GetMenuInfoRsp> query(GetMenuInfoReq getMenuInfoReq);

    /**
     * 修改
     *
     * @author duyh
     */
    R<UpdateMenuRsp> update(UpdateMenuReq updateMenuReq);

    /**
     * 删除
     *
     * @author duyh
     */
    R<DeleteMenuRsp> remove(DeleteMenuReq deleteMenuReq);

    /**
     * 列表
     *
     * @author duyh
     */
    R<GetMenuListRsp> list(GetMenuListReq getMenuListReq);
    /**
     * 列表
     *
     * @author duyh
     */
    R<GetRoleMenuListRsp> tree(GetRoleMenuListReq getRoleMenuListReq);

    /**
     * 获取角色可访问的菜单
     *
     * @param roleId
     * @return
     */
    List<String> queryMenusByRole(String roleId);

    /**
     * 获取Url对应的所有菜单
     *
     * @param menuUrl
     * @return
     */
    List<OpsAuthorityMenu> queryMenusByUrl(String menuUrl);
}
